package com.malie.myspringboot.mybatisPlus;

import com.malie.myspringboot.common.UserPlusEntity;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class MybatisPlusDemo {
    @Autowired
    MyBatisPlusDemoMapper myBatisPlusDemoMapper;

    @GetMapping("/plusDemo1")
    public String demo1() {
        UserPlusEntity entity = new UserPlusEntity();
        entity.setAge(18);
        entity.setName("小黄");
        myBatisPlusDemoMapper.insert(entity);
        return "ok";
    }

}
